package tmproject.hlhj.fhp.cartrans.presenter

import android.content.Context
import com.example.mymvp.BasePresenter
import tmproject.hlhj.fhp.cartrans.IView.UserCenterVIew
import tmproject.hlhj.fhp.cartrans.javaBean.BaseBean
import tmproject.hlhj.fhp.cartrans.javaBean.UserInfoBean
import tmproject.hlhj.fhp.cartrans.modules.UserCenterModule
import java.io.File

/**
 * Created by Never Fear   on 2018\8\28 0028.
 * Never More....
 */

class UserCenterPresenter :BasePresenter<UserCenterModule,UserCenterVIew>(), UserCenterModule.OnUserInfoListener {
    override fun createModule() {
        module= UserCenterModule()
        module.listener=this
    }
    override fun userInfoResp(userInfoBean: UserInfoBean) {
        view?.gotUserInfo(userInfoBean)
    }

    fun changeHead(c:Context,head:File){
        module.changeHead(head, c)
    }
    override fun changeHeadResp(baseBean: BaseBean) {
        view?.changeHead(baseBean)
    }
}
